<%= error_messages_for 'user' %>

<div id="user"></div>
<!--[form:user]-->
<fieldset>
<label for="user_employee_id"><span>Employee id</span>
	<%= f.text_field 'employee_id'  %>

</label>
<label for="user_chinese_name"><span>Chinese name</span><%#= f.text_field 'chinese_name' %>
<%#=	link_to_remote "Check", :update => "user",:url => "/users/check_user",:with => "'chinese_name=' + $('user_chinese_name').value"	%>
<input type="text" size="30" name="user[chinese_name]" id="user_chinese_name" onblur="new Ajax.Updater('user', '/users/check_user', {asynchronous:true, evalScripts:true, parameters:'chinese_name=' + $('user_chinese_name').value}); return false;" />
</label>
<label for="user_last_name"><span>Last name</span><%= f.text_field 'last_name'  %></label>
<label for="user_first_name"><span>First name</span><%= f.text_field 'first_name'  %></label>
<label for="user_english_name"><span>English name</span><%= f.text_field 'english_name'  %></label>
<label for="user_pinyin"><span>Short name</span><%= f.text_field 'pinyin'  %></label>

</fieldset>
<fieldset>
<label for="user_ext"><span>Ext</span><%= f.text_field 'ext'  %></label>

<label for="user_gender"><span>Gender</span><%= f.select 'gender',['female','male']  %></label>
<label for="user_business_unit"><span>Business unit</span><%= f.text_field 'business_unit'  %></label>
<label for="user_department_id"><span>Department</span><%= f.select 'department_id',@departments.collect {|p| [p.name,p.id]} %></label>
<label for="user_email"><span>Email</span><%#= f.text_field 'email' %>
	<input type="text" size="30" name="user[email]" id="user_email" onblur="new Ajax.Updater('user', '/users/check_email', {asynchronous:true, evalScripts:true, parameters:'email=' + $('user_email').value}); return false;" />
<%#=	link_to_remote "Check", :update => "user",:url => "/users/check_email",:with => "'email=' + $('user_email').value"	%>
</label>
</fieldset>
<fieldset>
<label for="user_total_coupons"><span>Total coupons</span><%= f.text_field 'total_coupons'  %></label>
<label for="user_total_out"><span>Total out</span><%= f.text_field 'total_out'  %></label>
<label for="user_remaining"><span>Remaining</span><%= f.text_field 'remaining'  %></label>
<label for="user_picture_url"><span>Picture url</span><%= f.text_field 'picture_url'  %></label>
</fieldset>

<!--[eoform:user]-->


